﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

using HGZP.BLL;
using HGZP.DAL;
using HGZP.Model;
using HGZP.PLL;
namespace SZCB
{
    public partial class yyquery : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            CFoodSubstanceBLL myCFoodSubstanceBLL = new CFoodSubstanceBLL();
            string sql = "select Food.sGuid,Food.sFoodName,Food.sLargeClassName,Food.sEnterpriseName,Food.dPrice,Food.sSpecification,Food.sUnit,Food.sPeiLiao,FoodSubstance.fNutrient,FoodSubstance.sFoodGuid  from Food,FoodSubstance  where FoodSubstance.sSubtanceName = '" + txtSearch.Text + "' and Food.sGuid = FoodSubstance.sFoodGuid  order by FoodSubstance.fNutrient";
            DataTable dt = myCFoodSubstanceBLL.F05_SelectByCommandText(sql);
            Repeater1.DataSource = dt;
            Repeater1.DataBind();
            idCount.Text = dt.Rows.Count.ToString();

        }
    }
}